home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
tcoop10a.zip
/
DOC.ZIP
/
CONTROL.DOC
< prev
next >
Wrap
Text File
|
1991-11-20
|
4KB
|
89 lines
CONTROL.DOC 11/20/91 Copyright (c) 1991 by James S. Clark
==========================================================================
CONTROL
Control Class
--------------------------------------------------------------------------
Class Name Control
Superclass <none>
Category Desktop
Other classes referenced Window
Other catagories referenced <none>
Used by many
Inherited by <none>
Maturity Index very low
Declaration Control *control = new Control( );
Instance Variables
int type
Instance Methods
Control (Window *theWindow, int type,
char *title, int x, int y,
int flag, int val, colors *clr);
int draw (int hilight);
int fieldedit();
int setstr (char *str);
int settitle(char *title);
int setvalue(int val);
int getstr (char *str);
int getvalue();
--------------------------------------------------------------------------
GENERAL DESCRIPTION
The Control Class provides an interface for creating and using buttons,
check boxes, text fields, or other controls type you derive from it.
In this version the control type governs the control methods used to
display and operate the control. In future versions new controls will
be derived from the control class. None will be built-in as they are
now.
--------------------------------------------------------------------------
VARIABLES
int type;
The control type number.
--------------------------------------------------------------------------
METHODS
Control (Window *theWindow, int type, char *title, int x, int y,
int flag, int val, colors *clr);
Creates a new control with the selected values and displays it in
the given window.
int draw (int hilight);
Re-draws the control, highlighted if the flag is set.
int fieldedit();
Allows you to edit the control's string using this simple line
editing function. The user must hit enter or escape to exit the
field editing method.
int getstr (char *str);
Returns a pointer to the control's string.
int getvalue();
Returns the control's value.
int setstr (char *str);
Sets the control string to a new string.
int settitle(char *title);
Changes the control title.
int setvalue(int val);
Sets the value of the control.
--------------------------------------------------------------------------
CONTROL TYPES
C_BUTTON Standard button type. Returns when selected.
C_CHECK Check box type. Toggles on and off when selected.
C_DIAL Dial type. Display horizontal bar indicator.
C_FIELD Test field type. Allows user editing when selected.
C_SCROLL Scroll bar type. Returns scaled position values.
--------------------------------------------------------------------------
CONTROL.DOC Copyright (c) 1991 by James S. Clark
==========================================================================